<?php

class mySfWidgetFormFilterInput extends sfWidgetFormFilterInput
{
  public function render($name, $value = null, $attributes = array(), $errors = array())
  {
  	if($name == 'ml_incidents_filters[machine_id]' AND isset($value)){
  		$machine = Doctrine::getTable('MlMachines')->find((int)$value);
  		$value = array();
  		if($machine){
  			$value['text'] = $machine->getNumero();
  		}else{
  			$value['text'] = 0;
  		}  		
  	}
  	return parent::render($name, $value, $attributes, $errors);
  }
}
?>